<?php
/**
 * Power By Tmac PHP MVC framework
 * $Author: zwt007 $  <zwttmac@qq.com>
 * $Id: CacheDriver.class.php 31 2011-07-11 15:25:51Z zwt007 $
 * http://www.t-mac.org；
 */
class CacheDriver {
	/**
	 * 缓存实例
	 *
	 * @var object
	 */
	static protected $instance = null;

	/**
	 * 取得缓存实例
	 *
	 * @return objeact
	 * @access public
	 * @static
	 */
	public static function getInstance() {
		global $TmacConfig;
		$class = 'Cache' . $TmacConfig['Cache']['class'];
		if (is_null(self::$instance)) {
			self::$instance = new $class();
		}
		return self::$instance;
	}
}